package com.gzbugu.bugusys.vo.abs;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.gzbugu.bugusys.vo.Staff;
import com.gzbugu.bugusys.vo.Type;

/**
 * AbstractContractService entity provides the base persistence definition of
 * the ContractService entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractContractService implements java.io.Serializable {

	// Fields

	private Integer id;
	private Type type;
	private Staff staff;
	private Date date;
	private Date start;
	private Date end;
	private String url;

	// Constructors

	/** default constructor */
	public AbstractContractService() {
	}

	/** full constructor */
	public AbstractContractService(Type type, Staff staff, Date date,
			Date start, Date end, String url) {
		this.type = type;
		this.staff = staff;
		this.date = date;
		this.start = start;
		this.end = end;
		this.url = url;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "type_id")
	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "staff_id")
	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "start", length = 10)
	public Date getStart() {
		return this.start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "end", length = 10)
	public Date getEnd() {
		return this.end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

	@Column(name = "url")
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

}